package com.huluobo.hyj.hyjmodel.ui.activity

import com.huluobo.hyj.hyjmodel.R
import com.huluobo.hyj.hyjmodel.widet.FragmentFactory
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : BaseActivity() {
    override fun getLayoutResId(): Int = R.layout.activity_main


    override fun init() {
        super.init()
        bottomBar.setOnTabSelectListener{
            tabId ->
            val beginTransaction = supportFragmentManager.beginTransaction()
            beginTransaction.replace(
                R.id.fragment_frame,
                FragmentFactory.instance.setFragment(tabId)!!  //!!肯定不为空，非空断言
            )
            beginTransaction.commit()//提交
        }
    }

}
